<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>变更记录</title>
    <jsp:include page="../../import.jsp" flush="true" />
</head>

<script type="text/javascript">
    var grid = null;
    var modId = '${modId}';
    var mfrId = '${mfrId}';
    $(function () {
        var _url = '<%=path%>/customer/cstbscinfo/initModRecList.do?mfrId=' + mfrId ;
        $("#ligergrid1").ligerGrid({
            url: _url,
            method : 'get',
            columns: [
                { display: '变更字段', name: 'modAttrCon', width: '20%' },
                { display: '变更前', name: 'modConBef', width: '25%' },
                { display: '变更后', name: 'modConAft', width: '25%' },
                { display: '变更操作', name: 'modTypCd', width: '15%',
					render: function (rowdata, rowindex, value, column) { 
						var h = '';//变更类型("ADD":新增 , “MDF”:修改, “DEL”:删除)
						if(rowdata.modTypCd == 'ADD'){
							h = '新增';
						}else if(rowdata.modTypCd == 'MDF'){
							h = '修改';
						}else if(rowdata.modTypCd == 'DEL'){
							h = '删除';
						}
						return h;
					}},
                { display: '变更说明', name: 'modTypCd', width: '15%',
					render: function (rowdata, rowindex, value, column) { 
						var h = '';//本次-历史
						if(rowdata.modId == modId){
							if(rowdata.isValid == 2){
								h = '<font color="red">本次连带变更</font>';
							}else{
								h = '<font color="red">本次变更</font>';
							}
						}else{
							if(rowdata.isValid == 2){
								h = '历史连带变更';
							}else{
								h = '历史变更';
							}
						}
						return h;
					}}
            ],
            pageSize:10,
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-2,
            rownumbers:true,
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(100);

    });

</script>

<body class="iframeBody">
	<div class="Wrapper"></div>
	<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>